Repository navigation
Conversation
…NUUM-ENGINE 4.13 step 1, measure before changing anything) A fixed 4096-frame ring (server-frame-costs.h, no allocation per frame) of decode/prefill step time, learning time after it, generation and prompt tokens, sequences and longest context; every 10 s one line: decode/prefill/learn/idle shares of wall time, aggregate gen tok/s over wall and while stepping, widest batch, longest context. Separates the two throughput causes seen on the M5 on 2026-11-17 (one mind seated; one stream at 24% of par) with data, and is the record the frame loop's cost curves and the core's ServingObserver will read. Model-free test: test-server-frame-costs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…ported by /metrics) with the recorder's own cost; the ring stays in the context (server_metrics is copied into every result); ring overwrites before a summary are counted and warned (Codex on ggml-org#6092: reuse the counter owner, measure overhead, report drops) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
|
Review exact 2513304: changes required before these records can drive cost curves or substantiate throughput.
Using server_metrics for cumulative exported counters and keeping the ring out of its copied response is sensible. But this needs a typed recorder read/drain contract and exact accounting first; logging a10-second summary is export, not a replayable captured hour. No merge/live-performance claim yet. #139 remains a separate stack dependency, including the corrected erase assertion; do not bring that entire branch live solely to obtain counters without its own review gates. |
…block on 2513304) - Work is what COMPLETED, from the owners that complete it: accepted output from n_tokens_generated (after speculative verification), prompt tokens from metrics_post_decode for decodes that succeeded, drafts proposed and accepted apart; outcome ok/retried/failed per frame. - The batch's shape (sequences, longest context) is snapshotted from the batch BEFORE decode, so a slot released by its own completion is counted. - Times are host elapsed, named as such: loop, batch (decode+post-decode), learning, unclassified rest; the time between iterations is 'outside the loop', never GPU idle. Mixed prefill+decode frames stay mixed. - The recorder is created at serving start (metrics.t_start), so no window reaches into host uptime; a frame belongs to the window it ends in; a window the ring overwrote is marked INCOMPLETE. - Typed read: every record has a sequence number; drain(after) returns them oldest first with an exact dropped count. The 10 s log line is an export only. - Tests: model-free (nonzero clock origin, overrun, mixed/failed/retried, drain); real callers: accepted-per-frame equals tokens_predicted_total across n_predict 1/4/16 (terminal slots), and with a draft model whose drafts are partly rejected. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
|
Re-review exact d146aa7. Accepted-output attribution, before-decode shape, host-time naming, activation origin and typed drain materially address the prior findings. I checked iterate(): on this base it is serial, so I am not reporting a shared-counter race. Remaining issues before acceptance:
The device timestamp implementation I meant is your open #133 at8c0e1e42c62cbc0f98f10563457904f367dee0dd: ggml_metal_device_gpu_time_record/read in ggml-metal-device.{h,m}, command-buffer GPUStartTime/GPUEndTime callbacks in ggml-metal-context.m, exposed through ggml_backend_gpu_time in ggml-metal.cpp. It is not on this base yet. Host-only records are legitimate if labelled and scoped as host-only; do not infer device utilization from them or introduce a second timestamp collector. This remains source review, not a merge or deployment approval. #139 dependency and exact CI gates remain separate. |
…ed, no per-frame allocation (Codex on d146aa7) - An RAII frame guard, created once the iteration has work, records the frame on normal end, on a failed pre_decode that returns early, and after decode failures; pre_decode failure marks the frame failed. - Exceptions iterate() swallows (the slot is released with an error) are counted on the frame as slot_failures. - The shape snapshot stamps a per-slot vector sized once at serving start: no per-frame allocation or clearing; its time is the frame's instrument_us, and the record's own write is added to the exported recording total; the log line reports recording cost as a share of loop time. - Device time stays out: host-only and named so. The GPU timestamp owner (ggml_metal_device_gpu_time_record/read, ggml_backend_gpu_time) is on fork #133, not this base; device busy time joins when #133 lands. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
… against), and proven through a real slot failure (Codex on 799a4c5) - --frame-costs / LLAMA_ARG_FRAME_COSTS, a startup fact: without it no ring is created, no shape snapshot runs and no frame is recorded; test_frames_are_off_unless_asked pins that. - frame_slot_failures_total on /metrics. test_failed_fill reuses the existing LLAMA_SERVER_TEST_FAULTS fill fault (no new fault switch): one slot's prompt fill throws inside iterate(), and the recorder counts exactly one slot failure, no failed frame, and accepted output equal to the surviving slot's predicted_n. - the server tests pass --frame-costs through ServerProcess.frame_costs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
Measure before changing anything (CONTINUUM-ENGINE 4.13, continuum ggml-org#6092). A fixed 4096-frame ring of per-frame decode/prefill step time, learning time, generation/prompt tokens, sequences and longest context; one summary line every 10 s (decode/prefill/learn/idle share of wall time, aggregate gen tok/s, widest batch, longest context). Separates the two M5 throughput causes of 2026-11-17 with data; the same records become the frame loop's cost curves and ServingObserver's numbers.
Model-free test:
test-server-frame-costs(attribution by kind, idle, window bounds, ring keeps the newest N).Not built locally (the M5 is serving; rule 2): CI is the compile proof.
🤖 Generated with Claude Code
https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo